<?php

/**
 * AbetProject form base class.
 *
 * @method AbetProject getObject() Returns the current form's model object
 *
 * @package    sfproject
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseAbetProjectForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                 => new sfWidgetFormInputHidden(),
      'abet_instructor_id' => new sfWidgetFormPropelChoice(array('model' => 'AbetInstructor', 'add_empty' => true)),
      'abet_team_id'       => new sfWidgetFormPropelChoice(array('model' => 'AbetTeam', 'add_empty' => true)),
      'proj_title'         => new sfWidgetFormInputText(),
      'proj_desc'          => new sfWidgetFormTextarea(),
      'proj_ctgry'         => new sfWidgetFormInputText(),
      'proj_degree'        => new sfWidgetFormInputText(),
      'created_at'         => new sfWidgetFormDateTime(),
      'updated_at'         => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                 => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'abet_instructor_id' => new sfValidatorPropelChoice(array('model' => 'AbetInstructor', 'column' => 'id', 'required' => false)),
      'abet_team_id'       => new sfValidatorPropelChoice(array('model' => 'AbetTeam', 'column' => 'id', 'required' => false)),
      'proj_title'         => new sfValidatorString(array('max_length' => 20)),
      'proj_desc'          => new sfValidatorString(array('required' => false)),
      'proj_ctgry'         => new sfValidatorString(array('max_length' => 30)),
      'proj_degree'        => new sfValidatorString(array('max_length' => 30)),
      'created_at'         => new sfValidatorDateTime(array('required' => false)),
      'updated_at'         => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('abet_project[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetProject';
  }


}
